var tab= document.getElementById("tab").getElementsByTagName("li")
console.log(tab);
var lists=document.getElementById("lists").getElementsByTagName("ul")
console.log(lists)
for(var i=0;i<tab.length;i++){
    tab[i].onclick=showlist;

}

function showlist(){
    for(var i=0;i<tab.length;i++){
        if(tab[i]===this){
            tab[i].className ="op";    
            lists[i].className="商品0-2 active";
        }
        else{
            tab[i].className ="";
            lists[i].className="商品0-2";
        }
    }
}
